from flask import request

from . import app_account

from .update_pwd import ResetPwd

@app_account.route('/reset_password',methods=['POST'])

def resets():

    date=request.form
    phone=date.get('phone')
    new_password=date.get('new_pass_word')
    cnew_password=date.get('cnew_pass_word')
    verify_code=date.get('verify_code')

    with ResetPwd() as a:

        info=a.reset(phone,verify_code,new_password,cnew_password,request.method)

    return info

    

